package br.com.news.database.daos;

import java.util.List;

import javax.inject.Named;

import br.com.news.database.daos.interfaces.ICategoriaDao;
import br.com.news.database.entities.CategoriaEntity;
import br.com.news.database.utils.GenericDao;

@Named
public class CategoriaDao extends GenericDao<CategoriaEntity, Long> implements ICategoriaDao{

	@Override
	public List<CategoriaEntity> findCategoriaByUsuarioName(String login) {
		return executeQuery("select c from CategoriaEntity c where c.usuario like '%"+login+"%' order by c.idCategoria");
	}

}
